<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>插入新课程信息</title>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="/webjars/bootstrap/3.3.5/css/bootstrap.min.css" />
    <script src="/webjars/jquery/3.1.1/jquery.min.js"></script>
    <script src="/webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script>

</head>

<body>

<form action="/insertCourse" method="post" class="form-horizontal" role="form">
    <h2 align="center">添加课程</h2>
    <div class="form-group">
    <label for="cno" class="control-label col-md-2 col-md-offset-3">
    课程号：
        </label>
        <div class="col-md-2">

        <input type="text" name="cno" class="form-control" id="cno"><br><br>
        </div>
    </div>

    <div class="form-group">
        <label for="cname" class="control-label col-md-2 col-md-offset-3">
        课程名称：
        </label>
        <div class="col-md-2">

        <input type="text" name="cname" class="form-control" id="cname"><br><br>
        </div>
    </div>
    <div class="form-group">
        <label for="cpno" class="control-label col-md-2 col-md-offset-3">
        课程先修号：
        </label>
        <div class="col-md-2">
        <input type="text" name="cpno" id="cpno" class="form-control"><br><br>
        </div>
    </div>
    <div class="form-group">
    <label for="ccredit"  class="control-label col-md-2 col-md-offset-3">
            课程学分：
        </label>
        <div class="col-md-2">
            <input type="text" class="form-control" name="ccredit" id="ccredit"><br><br>
    </div>
    </div>
    <div class="form-group">
        <div class="col-md-8 col-md-offset-7">
        <input type="submit" class="btn btn-default" value="增加课程">
        </div>
    </div>
</form>

<a class="btn btn-danger" th:href="@{/}" >跳转到首页</a><br/><br/>

<!-- <table border="1">
    <tr>
        <th>课程号</th>
        <th>课程名</th>

        <th>课程学分</th>
        <th>先修课程号</th>
    </tr>
    <tr th:each="course:${course}">
        <th th:text="${course.getCno()}"></th>
        <th th:text="${course.getCname()}"></th>
        <th th:text="${course.getCcredit}"></th>
        <th th:text="${course.getCpno()}"></th>

    </tr>
</table>
<a th:href="@{/}"-->
</body>
</html>